<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>      
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
      
<!DOCTYPE>
<html>
<head>
<meta charset="UTF-8">
<base href="${pageContext.request.contextPath}/">
<title>首页</title>

<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"
	href="bootstrap/css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet"
	href="bootstrap/css/bootstrap-theme.min.css">

<link rel="stylesheet" href="style.css" type="text/css">
	
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="jquery/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="bootstrap/js/bootstrap.min.js"></script>

<!-- 引用jQuery Easyui 文件 -->
<link rel="stylesheet" type="text/css" href="easyui/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>

</head>

<body  text="#000000" topmargin="2" style="background-color: #87CEEB">

<div align="center" style="margin:0 auto;padding: 0">

<table style="width:760; border:0;cellspacing:0;cellpadding:0;align:center">
  <tr> 
    <td background="images/topback.gif" width="130"><img src="images/sitelogo.gif" height="88"></td>
    <td background="images/topback.gif" width="500" align="center" valign="middle"><a href="http://www.fans8.com" target="_blank"><img src="images/fans8.gif" width="468" height="60" border="0"></a> 
    </td>
    <td background="images/topback.gif" width="130"> <!-- #BeginLibraryItem "/Library/custm.lbi" -->
    
    
    <table style="width:100%; border:0;cellspacing:2;cellpadding:2">
        <tr> 
          <td valign="middle" align="center"><a href="cart.html"><img src="images/button_cart.gif" width="87" height="18" border="0"></a></td>
        </tr>
        <tr> 
          <td valign="middle" align="center"><a href="checkorder_login.html"><img src="images/button_ddcx.gif" width="87" height="18" border="0"></a></td>
        </tr>
        <tr> 
          
    <td valign="middle" align="center"><a href="customer_register.html"><img src="images/button_regist.gif" width="87" height="18" border="0"></a></td>
        </tr>
      </table>
      
      
      <!-- #EndLibraryItem --></td>
  </tr>
</table>



<form name="form2" method="post" action="" style="width:100%; border:0;cellspacing:2;cellpadding:2">
  <table style="width:760; border:0; cellspacing:1;cellpadding:0;align:center;bgcolor:#000000" >
    <tr> 
      <td bgcolor="#FF9900" height="30" valign="middle" align="center"> <!-- #BeginLibraryItem "/Library/nav.lbi" --><table style="width:80%; border:0;cellspacing:2;cellpadding:2">
          <tr align="center" valign="middle"> 
            <td><a href="newproduct.asp" class="white">新品快递</a></td>
            
    <td><a href="commend.html" class="white">重点推荐</a></td>
            
    <td><a href="bestsell.html" class="white">销售排行</a></td>
            
    <td><a href="bestprice.html" class="white">特价商品</a></td>
          </tr>
        </table><!-- #EndLibraryItem --></td>
    </tr>
    <tr> 
      <td bgcolor="#FFCC66" height="30">
        <table style="width:100%;border:0;cellspacing:0">
          <tr>
            <td width="50%">　${counterpic}</td>
            <td width="50%" valign="middle" align="center"> 
              <select name="mnuCategory">
                <option value="1" selected>在图书商城中</option>
                <option value="2">在影视商城中</option>
                <option value="3">在音乐商城中</option>
              </select>
              <input type="text" name="textPname" size="20" maxlength="50">
              <input type="submit" name="Submit" value="搜索">
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
</div>


<table style="width:760; border:0; cellspacing:0;cellpadding:0" align="center">
  <tr> 
    <td width="300" valign="top"> 
      <table  style="width:160;border:0;cellspacing:1;bgcolor:#000000">
        <tr>
          <td bgcolor="#006699" height="30" valign="middle"> 
            <div align="center"><font color="#FFFFFF" size="3"><img src="images/icon_arrow_d.gif" width="14" height="15" >　产品分类　<img src="images/icon_arrow_d.gif" width="14" height="15"></font></div>
          </td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF">
            <table  style="width:100%;border:0;cellspacing:2;cellpadding:2">
              <tr> 
                <td valign="middle" align="center"><img src="images/shop_book.gif" width="81" height="15"></td>
              </tr>
              <tr> 
                <td align="center" bgcolor="#FFFF99"> 
                  <table  style="width:100%;border:0;cellspacing:0;cellpadding:2">
                    <!-- 图书子类列表开始 -->
                    <c:forEach items="${bookList}" var="book" >
                    
                    <tr> 
                      <td width="25%" align="center" valign="middle">
                        <img src="images/board_arrow.gif" width="17" height="13">
                      </td>
                      <td width="75%" align="left" valign="middle">
                         <a href="subcategory.action?id=${book.id}">${book.name}</a>
                      </td>
                    </tr>
                    
                    </c:forEach>
                    <!-- 图书子类列表结束 --> 
                  </table>
                  
                </td>
              </tr>
              <tr> 
                <td valign="middle" align="center"><img src="images/shop_video.gif" width="81" height="19"></td>
              </tr>
              <tr>
                <td align="center" bgcolor="#FF99FF"> 
                  <table style="width:100%;border:0;cellspacing:0;cellpadding:2">
                    <!-- 影视子类列表开始 -->
                    <c:forEach items="${vidoList}" var="vido">                    
                    <tr> 
                      <td width="25%" align="center" valign="middle">
                         <img src="images/board_arrow.gif" width="17" height="13">
                      </td>
                      <td width="75%" align="left" valign="middle">
                         <a href="subcategory.jsp?id=${vido.id}">${vido.name}</a>
                      </td>
                    </tr>
                    </c:forEach>
                    <!-- 影视子类列表结束 -->
                  </table>
                </td>
              </tr>
              <tr> 
                <td valign="middle" align="center"><img src="images/shop_music.gif" width="81" height="20"></td>
              </tr>
              <tr> 
                <td align="center" bgcolor="#99CCFF"> 
                  <table style="width:100%;border:0;cellspacing:0;cellpadding:2">
                    <!-- 音乐子类列表开始 -->
                    <c:forEach items="${musicList}" var ="music">                    
                    <tr> 
                      <td width="25%" align="center" valign="middle">
                         <img src="images/board_arrow.gif" width="17" height="13">
                      </td>
                      <td width="75%" align="left" valign="middle">
                         <a href="subcategory.jsp?id=${music.id}">${music.name}</a>
                      </td>
                    </tr>
                    </c:forEach>
                    <!-- 音乐子类列表结束 -->
                  </table>
                </td>
              </tr>
              <tr> 
                <td valign="middle" align="center">&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
    <td width="420" valign="top" align="center"> <br>
      <table style="width:96%; border:0; cellspacing:0;cellpadding:0">
        <tr> 
          <td><img src="images/index_newproduct.gif" width="303" height="19"></td>
        </tr>
        <tr> 
          <td>
          
            <table style="width:100%;border:0; cellspacing:2;cellpadding:2">
              
          <!-- 最新产品开始 -->    
              <tr> 
                <td rowspan="3" width="25%" align="center">
                	<a href="product.action?id=${newProduct.id}"><img src="images/product/${newProduct.smallImg}" alt="产品图片" border="0"></a>
                </td>
                <td width="75%">
                	<a href="product.action?id=${newProduct.id}" class="productName">${newProduct.name}</a>
                </td>
              </tr>
              <tr> 
                <td width="75%" class="a">${newProduct.author}</td>
              </tr>
              <tr> 
                <td width="75%">
                   
                   <c:if test="${fn:length(newProduct.description)>100}">                   
                       ${ fn:substring(newProduct.description,0,100) }
                       ...
                   </c:if>
                   
                   <c:if test="${fn:length(newProduct.description)<=100}">                   
                       ${newProduct.description}
                   </c:if>
                   
                
                </td>
              </tr>

            
            <!-- 最新产品结束 -->
            </table>
         
          </td>
        </tr>
        <tr> 
          <td>
          
            <table style="width:100%; border:0;cellspacing:2;cellpadding:2;height:52">
	        <tr> 
	          <td align="right"><img src="images/index_commend.gif" width="303" height="19"></td>
	        </tr>
          <!--推荐商品开始 -->    
              
              <tr> 
                <td width="75%" align="right">
                	<a href="product.jsp?id=${commendProduct.id}" class="productName">${commendProduct.name}</a>
                </td>
                <td rowspan="3" align="center">
	                <a href="product.jsp?id=${commendProduct.id}">
	                	<img src="images/product/${commendProduct.smallImg}"  alt="产品小图片"border="0">
	                </a> 
                </td>
              </tr>
              <tr> 
                <td width="75%" align="right">${commendProduct.author}</td>
              </tr>
              <tr> 
                <td width="75%"> 
                
                 <c:if test="${fn:length(commendProduct.description)>100}">                   
                       ${ fn:substring(commendProduct.description,0,100) }
                       ...
                   </c:if>
                   
                   <c:if test="${fn:length(commendProduct.description)<=100}">                   
                       ${commendProduct.description}
                   </c:if>
                   
                
                </td>
              </tr>
            <!--推荐商品结束 -->
              
            </table>
            
          </td>
        </tr>
        <tr>
          <td>
          
            <table style="width:100%;border:0;cellspacing:2;cellpadding：2">
            <tr> 
               <td><img src="images/index_hotprice.gif" width="303" height="19"></td>
            </tr>
               <!-- 折扣商品开始-->
              
              <tr> 
                <td rowspan="3" width="18%" align="center">
                	<a href="product.jsp?id=${hotDealProduct.id}"><img src="images/product/${hotDealProduct.smallImg}" alt="产品小图片" border="0"></a>
                </td>
                <td colspan="2">
                	<a href="product.jsp?id=${hotDealProduct.id}" class="productName">${hotDealProduct.name}</a> 
                </td>
              </tr>
              <tr> 
                <td colspan="2">${hotDealProduct.author}</td>
              </tr>
              <tr> 
                <td width="20%">原价：<span class="hotPrice">${hotDealProduct.price}</span>元</td>
                <td width="80%">现价：${hotDealProduct.listPrice}元</td>
              </tr>
              <tr> 
                <td colspan="3"> 
                   <c:if test="${fn:length(hotDealProduct.description)>100}">                   
                       ${ fn:substring(hotDealProduct.description,0,100) }
                       ...
                   </c:if>
                   
                   <c:if test="${fn:length(hotDealProduct.description)<=100}">                   
                       ${hotDealProduct.description}
                   </c:if>
                   
                </td>
              </tr>
              
            <!-- 折扣商品结束-->  
            </table>
            
          </td>
        </tr>
      </table>
    </td>
    <td width="180" valign="top"> 
      <table  style="width:180;border:0;cellspacing:1;bgcolor:#000000" >
        <tr> 
          <td bgcolor="#006699" height="22" valign="middle"> 
            <div align="center"><font color="#FFFFFF" size="3"><img src="images/nav_document.gif" width="18" height="18"> 
              今日热点</font></div>
          </td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF" align="center" valign="top"> 
            <table style="width:100%; border:0;cellspacing:2;cellpadding:2">
              <tr> 
                <td align="center"> 
                  <table style="width:100%; border:0;cellspacing:0;cellpadding:2" >
                    <!--热点内容列表开始 -->
                    <c:forEach items="${todayHotList}" var="todayHot">                    
                    <tr> 
                      <td width="10%" align="center" valign="top">
                         <img src="images/board_arrow_u.gif" width="17" height="13">
                      </td>
                      <td width="90%" align="left" valign="middle">
                         <a href="product.jsp?id=${todayHot.id}">${todayHot.name}</a>
                      </td>
                    </tr>
                    </c:forEach>
                    <!--热点内容列表结束 -->
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <br>
      <table  style="width:180;border:0;cellspacing:1;bgcolor:#000000">
        <tr> 
          <td bgcolor="#FFCC66" height="22" valign="middle"> 
            <div align="center"><font color="#FFFFFF"><img src="images/icon_arrow_u.gif" width="14" height="14">　</font>销售排行　<img src="images/icon_arrow_u.gif" width="14" height="14"></div>
          </td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF">
            <table style="width:100%; border:0;cellspacing:2;cellpadding:2">
              <tr>
                <td>
                  <table style="width:100%; border:0;cellspacing:0;cellpadding:2">
                    <!--排行内容列表开始 -->
                    <c:forEach items="${bestSellList}" var="bestSell">                    
                    <tr> 
                      <td width="10%" align="center" valign="top">
                         <img src="images/board_arrow_u.gif" width="17" height="13">
                      </td>
                      <td width="90%" align="left" valign="middle">
                        <a href="product.jsp?id=${bestSell.id}">${bestSell.name}</a>
                      </td>
                    </tr>
                    </c:forEach>
                    <!--排行内容列表结束 -->
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<table style="width:760; border:0;cellspacing:0;cellpadding:0;" align="center">
  <tr> 
    <td background="images/topback.gif" align="center" height="16"><font color="#FFFFFF">copyright 
      2001 Powered by Peter.HJ</font></td>
  </tr>
</table>

</body>
</html>